home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / mscfunct / key.doc < prev    next >
Text File  |  1987-05-06  |  877b  |  30 lines

  1.        Keyboard support functions for Microsoft C
  2.  
  3. #include <key.h>
  4.  
  5. int key_scan();
  6.  
  7. int key_shift();
  8.  
  9.  
  10. o Descriptions
  11.  
  12. key_scan determines if a keystroke is waiting.  If there is one, it returns
  13. the character (in the low byte) and scan code (in the high byte).  If no
  14. keystroke is waiting, it returns a -1.  This is a non-destructive read, the
  15. character is not removed from the keyboard buffer and a subsequent call to
  16. getch or getche will return the same character.
  17.  
  18. key_shift returns the shift key status byte as described below.
  19.  
  20.     bit       mask            meaning
  21.      0       0x01        Right SHIFT key is depressed
  22.      1       0x02        Left SHIFT key is depressed
  23.      2       0x04        CTRL key is depressed
  24.      3       0x08        ALT key is depressed
  25.      4       0x10        SCROLL LCK active
  26.      5       0x20        NUM LCK active
  27.      6       0x40        CAPS LOCK active
  28.      7       0x80        INS active
  29.  
  30.